<template>
	<view>
		<view class="page_title">
		  <nav-back></nav-back>
		  <view class="page_name">我的承诺书</view>
		  <view class="blank"></view>
		</view>
		
		<view class="banxin">
		  <view class="letter">
		    <view class="title">单身承诺书</view>
		    <text class="content">
		      本人在暖余生平台注册使用网名 <text class="user">{{userName}}</text>，会员号<text class="user">{{userNumber}}</text>，现对所登记交友信息做如下承诺：
		      
		      1.本人当前婚姻状况为未婚/离异
		      2.所登记均为真实信息，如有虚假愿意承担由此导致的一切后果
		    </text>
		    <view class="sign">
		      <image :src="signUrl" mode=""/>
		    </view>
		    <text class="date">{{signDate}}</text>
		  </view>
		
		</view>
	</view>
</template>

<script>
	import request from '@/utils/request.js'
	import NavBack from '@/components/NavBack.vue'
	
	export default {
		components: {
			NavBack
		},
		data() {
			return {
				userName:'',
				userNumber:'',
				signDate:'2024年8月1日',
				signUrl:"/static/img/sign.png"
			};
		},
	  onLoad() {
		let that = this
		this.userName = uni.getStorageSync('name')
		this.userNumber = uni.getStorageSync('number')
		request(`/employee/${uni.getStorageSync('id')}`).then((res)=>{
		  let authentication = res.data.data.authentication
		  console.log(authentication,'authentication');
		  that.signDate = authentication.singleTime.slice(0,10)
		  that.signUrl = authentication.singleUrl
		})
	  },
	}
</script>

<style lang="scss">
.letter{
  padding: 0 50rpx;
  .title{
    align-items: center;
    margin-top: 60rpx;
    color: rgba(51, 51, 51, 1);
    line-height: 46rpx;
    font-weight: 500;
    text-align: center;
    color: rgba(51, 51, 51, 1);
  }
  .content{
	  display: block;
    line-height: 46rpx;
    margin-top: 40rpx;
    color: rgba(102, 102, 102, 1);
  }
  .user{
    text-decoration: underline;
  }
  .sign{
    text-align: right;
    margin-top: 50rpx;
    image{
      margin: 20rpx;
      width: 80rpx;
      height: 40rpx;
    }
  }
  .date{
    width: 100%;
    display: block;
    text-align: right;
  }
}
</style>
